Abstract: New technologies such as functional magnetic resonance imaging (fMRI) have aided our ability to understand human brain function. Distinguishing causal from spurious relationships is of great interest and importance for both basic neuroscience and applications in medicine, drug development, and clinical practice. Neuroscientists want to know how experimental stimuli affect brain function, how neural activity in different brain regions are causally linked, and how neural activity mediates the relationship between a stimulus and an outcome. Researchers apply various statistical procedures (e.g., Granger causality, dynamic causal models, structural equation models, and directed graphical models) to fMRI data, interpreting the resulting associations as effects, often inappropriately. This is a major problem. The previous funding cycle of this grant laid the groundwork for a principled approach to casual inference in neuroscience research, employing the potential outcomes notation used in the statistical literature on causal inference. Here we seek to extend the frame- work developed there to better study mediation, where neural activity in one or more brain regions mediates a treatment-outcome relationship, and effective connectivity, where activations in different regions are causally linked. To begin, we de?ne new causal effects and construct a new whole brain model that will facilitate the study of localization, mediation, and effective connectivity at the regional level under assumptions more realistic than those typically made in modeling fMRI data. Further, we create a new statistical method for conduct- ing high-dimensional mediation analysis that identi?es networks that may mediate the relationship between a treatment and outcome. Finally, building on the literature on instrumental variables and structural equation mod- els, we develop new methods for studying mediation and effective connectivity after the application of external neurostimulation using recently developed technologies such as transcranial magnetic stimulation (TMS) and transcranial direct current stimulation (tDCS) that are starting to see widespread use in both theoretical neuro- science and applied contexts. We apply the methods to fMRI data from studies of post-traumatic stress disorder, thermal pain and social evaluation.